package com.xx.douyi.controller;

import com.xx.douyi.bean.GPGGA;
import com.xx.douyi.service.GPGGAService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @Description: com.xx.douyi.controller
 * @Author: ruby
 * @CreateTime: 2023-04-19 12:30
 */
@RestController
@RequestMapping("/GPGGA")
public class GPGGAController {
    @Autowired
    private GPGGAService gpggaService;
    @GetMapping("/transform")
    public GPGGA transform(@RequestParam("g") String data){
//        String data = "$GPGGA,092204.999,4250.5589,S,14718.5084,E,1,04,24.4,12.2,M,19.7,M,,,0000*1F";
        return gpggaService.transform(data);
    }
}
